#ifndef _YUANCE_RGA_H
#define _YUANCE_RGA_H

#include <string.h>

// #include "utils.h"
#include "rga_v2/src/im2d_api/im2d.hpp"
#include "rga_v2/src/RockchipRga.h"
#include "rga_v2/src/RgaUtils.h"
#include "rga_v2/src/rga.h"

typedef struct RgaCfg_t {
    unsigned int  src_w;
    unsigned int  src_h;
    unsigned int  dst_w;
    unsigned int  dst_h;
    unsigned int  src_fmt;
    unsigned int  dst_fmt;
} RgaCfg;

class RgaWrapper{
    public:
    RgaWrapper();
    ~RgaWrapper();

    int init(RgaCfg cmd);
    int cvtColorImage(uint8_t *inputBuf, uint8_t* outputBuf);
    int resizeImage(uint8_t *inputBuf, uint8_t* outputBuf);

    private:
    int checkCmd(RgaCfg cmd);

    public:

    private:
    RgaCfg mCfg;
    im_rect 		mSrcRect;
    im_rect 		mDstRect;
    rga_buffer_t 	mSrcRgaBuf;
    rga_buffer_t 	mDstRgaBuf;

};

#endif